#ifndef GAME_H
#define GAME_H
#include <d3d9.h>
#include <d3dx9.h>
#pragma warning( disable : 4996 ) // disable deprecated warning 
#include <strsafe.h>
#pragma warning( default : 4996 )

#pragma comment (lib,"d3d9.lib")
#pragma comment (lib,"d3dx9.lib")
#include "Singleton.h"
#include "NonCopyable.h"
#include "Paddle.h"
#include "Ball.h"
#include "Text.h"
#include "InputHandler.h"

class GameState;
class Game : public NonCopyable
{
public:
	static LRESULT WINAPI MsgProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam );
	VOID Run();
	HRESULT Load();
	void Unload();
	void Draw();
	void Update();
	LPDIRECT3D9 m_pD3D;
	LPDIRECT3DDEVICE9 m_pd3dDevice;
	LPDIRECT3DVERTEXBUFFER9 m_pVB;
	GameObjects m_GameObjects;
	int GetWinH();
	int GetWinW();
	HWND GetWindowHandle();


private:
	Game();
	friend class Singleton<Game>;
	int m_WinH;
	int m_WinW;
	GameObject* m_PL; //Right Paddle
	GameObject* m_PR; //Right Paddle
	GameObject* m_Ball; //Ball
	GameObject* m_score; //Score
	HWND m_hWnd;

};
typedef Singleton<Game> TheGame;
#endif